<template>
  <div id="">

    <div class="bigPicbanner">
      <swiper :options="swiperOption" style="height:100%;">
        <swiper-slide v-for="(items,index) in housePic" :key="items.key">
          <p class="housePicTitle">{{items.albumName}}</p>
          <div class="housePicDiv" :style="{backgroundImage:'url(' + items.housePic + ')'}"></div>
        </swiper-slide>
      </swiper>
    </div>
  </div>
</template>
<script>

import {mapState,mapMutations} from 'Vuex';
export default {
  name: "",
  data: () => ({
    swiperOption: {
        pagination: {

        },
        autoplay:{
          delay: 3000,
        	disableOnInteraction: false,
        },
        paginationClickable: true,
        loop: true,
        onTouchEnd: function() {
            swiper.startAutoplay()
        }
     },

  }),
  computed: {
    ...mapState({
      housePic:state=>state.bigImg.housePic,
      phoneBalbum:state=>state.bigImg.phoneBalbum,
    })
  },
  methods: {

  },
  mounted() {
    //do something after mounting vue instance
    let that = this;
    console.log(that.housePic);
    console.log(that.phoneBalbum);
  },
  created() {
    //do something after creating vue instance
    let that = this;

  }
}
</script>
<style lang="scss">
.housePicTitle{
  text-align: center;
  height: 5vh;
  line-height: 5vh;
  border-bottom: 1px solid $borderColor;
}
.bigPicbanner{
  padding: 0;
  text-align: right;
  height: 90vh;
  .housePicDiv{
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    height: 100%;
    width: 100%;
  }
}
</style>
